<?php

namespace App\Controller\Report;


use App\Controller\BaseController;
use App\Request\Report\SuggestCreateRequest;
use App\Services\Report\SuggestService;
use Hyperf\Context\Context;
use Hyperf\Di\Annotation\Inject;

class SuggestController extends BaseController
{

    #[Inject]
    public SuggestService $suggestService;

    /**
     * Note - 反馈与建议
     * DateTime 2024/8/8 10:18
     * User Admin
     * @return mixed
     */
    public function create(SuggestCreateRequest $request)
    {
        $userInfo = Context::get('user');
        $params = $this->request->post();
        $request->execute($params);
        return $this->return($this->suggestService->create($userInfo, $params));
    }

}